package com.jnzc.ocr.serv.shop.api.impl;

import com.jnzc.ocr.common.bean.PageResult;
import com.jnzc.ocr.common.utils.ValidateUtils;
import com.jnzc.ocr.serv.shop.api.ShopOrderApi;
import com.jnzc.ocr.serv.shop.entity.ShopOrder;
import com.jnzc.ocr.serv.shop.filter.ShopOrderFilter;
import com.jnzc.ocr.serv.shop.service.ShopOrderService;
import com.jnzc.ocr.serv.shop.vo.ShopOrderPayVo;
import com.jnzc.ocr.serv.shop.vo.ShopOrderSaleCreateVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangcm
 * @version 1.0, 2017-10-06
 */
@RestController
public class ShopOrderApiImpl implements ShopOrderApi {

    @Autowired
    private ShopOrderService shopOrderService;

    @Override
    public ShopOrder find(Long id, Long shopId) {
        return shopOrderService.find(id, shopId);
    }

    @Override
    public PageResult<ShopOrder> search(@RequestBody ShopOrderFilter filter, Integer pageNo, Integer pageSize) {
        return shopOrderService.search(filter, pageNo, pageSize);
    }

    @Override
    public ShopOrder pay(@RequestBody ShopOrderPayVo payVo) {
        return shopOrderService.pay(payVo);
    }
}
